package com.example.springpethospital.entity;

public enum FileType {
    Other, Image, Video;

    public int toInteger() {
        return this.ordinal();
    }

    public static FileType toFileType(int value) {
        if (value >= FileType.values().length || value < 0) return Other;
        return FileType.values()[value];
    }
}